<?php

namespace App\Models\Api;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Favorites extends Model
{
    //收藏表
    use HasFactory;
    use HasFactory;
    use HasDateTimeFormatter;
    protected $table = 'Favorites';
    protected $guarded=[];

    //查看用户收藏的房源id
    public static function getFavorites($user_id){
        return self::where('uid',$user_id)->get();
    }



}
